Function Reference

_Iif

Perform a boolean test within an expression.

#include <Misc.au3>
_Iif ( $f_Test, $v_TrueVal, $v_FalseVal )

 

Parameters

$f_Test Boolean test.
$v_TrueVal Value to return if $f_Test is true.
$v_FalseVal Value to return if $f_Test is false.

 

Return Value

One of $v_TrueVal or $v_FalseVal.

 

Remarks

Note that all parameters are evaluated, even though only one is returned.

 

Related

None.

 

Example


#include <Misc.au3>

Dim $i_Count, $i_Index

For $i_Index = 1 To 2
   MsgBox(4096, "Count", "This dialog has displayed " & String($i_Index) & _
          " time" & _Iif($i_Index > 1, "s", "") & " so far")
Next

Exit